﻿<%@ page language="C#" autoeventwireup="true" inherits="Default_Cart, App_Web_bpburowk" %>

<%@ Register Src="Footer.ascx" TagName="Footer" TagPrefix="MojoCube" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="shortcut icon" href="../Images/favicon.ico" type="image/x-icon" />
    <%=MainCss%>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/main.js" type="text/javascript"></script>
    
    <style type="text/css">
        body{ background:#F5F5F5;}
    </style>

</head>

<body>

<form id="form1" runat="server">

<asp:ScriptManager id="ScriptManager1"  runat="server"></asp:ScriptManager>
    
<header>

    <div class="topbar">
        <a href="javascript:history.back(-1)" class="back_btn"><i class="icon iconfont">&#xf0115;</i></a>
        <a href="Chat.aspx" class="top_home"><i class="icon iconfont">&#xf0200;</i></a>
        <h1 class="page_title"><asp:Label ID="lblTitle" runat="server"></asp:Label></h1>
    </div>

</header>

<div id="show_div">
            
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
                    
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" GridLines="None" BorderWidth="0px" CssClass="gridview" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated">
                <Columns>
                    <asp:TemplateField HeaderText="选">
                        <ItemTemplate>
                            <asp:Label ID="lblID" runat="server" Text='<%# Bind("pk_Cart") %>' Visible="False"></asp:Label>
                            <asp:Label ID="lblfkID" runat="server" Text='<%# Bind("fk_ID") %>' Visible="False"></asp:Label>
                            <asp:CheckBox ID="cbSelect" runat="server" CssClass="cbox1" AutoPostBack="True" OnCheckedChanged="cbSelect_CheckedChanged" />
                        </ItemTemplate>
                        <ItemStyle CssClass="cbox" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="lblImage" runat="server" Text='<%# Bind("ImagePath") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="snap" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="名称">
                        <ItemTemplate>
                            <asp:Label ID="lblProductName" runat="server" Text='<%# Bind("ProductName") %>'></asp:Label>
                            <br />
                            <asp:Label ID="lblRemark" runat="server" Text='<%# Bind("Remark") %>' style="font-size:10pt; color:#999"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="200px" CssClass="titleTD" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="单价">
                        <ItemTemplate>
                            <asp:Label ID="lblPrice" runat="server" Text='<%# Bind("Price") %>' style="font-size:11pt; color:#FF0000"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle CssClass="price" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="数量">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnbAdd" runat="server" CommandName="_add"><img src="images/add.png" alt="add" /></asp:LinkButton>
                            <asp:TextBox ID="txtQty" runat="server" Text='<%# Bind("Qty") %>' CssClass="txt" AutoPostBack="True" OnTextChanged="txtQty_TextChanged" style="width:47px"></asp:TextBox>
                            <asp:LinkButton ID="lnbReduce" runat="server" CommandName="_reduce"><img src="images/reduce.png" alt="reduce" /></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnbDelete" runat="server" CommandName="_delete"><img src="images/delete.png" alt="delete" style="width:20px;" /></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="50px" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
                   
            <asp:Panel ID="panEmpty" runat="server" Visible="false">
                <div style="text-align:center; padding:10px; font-size:15pt; height:200px; font-size:12pt;">
                    <div style="text-align:center; padding-top:20px;">
                        <img src="images/empty.png" />
                    </div>
                    <br />
                    <span style="color:#999;">您的购物车还是空荡荡的</span>
                    <br /><br />
                    <a href="Product.aspx"><span style="background:#89BE48; color:#fff; padding:5px 20px 8px 20px; border-radius:5px;">去挑选</span></a>
                    <a href="OrderList.aspx"><span style="background:#FF4D00; color:#fff; padding:5px 20px 8px 20px; border-radius:5px;">查订单</span></a>
                </div>
            </asp:Panel>
          
            <div id="panOrder" runat="server" style="text-align:center; position:fixed; bottom:50px; background:#FEFEFE; width:100%; height:50px">

                <table style="width:100%;border:0;margin:0;border-collapse:collapse;border-spacing:0;">
                    <tr>
                        <td style="width:66px; text-align:center">
                            <asp:CheckBox ID="cbSelectAll" runat="server" CssClass="cbox1 cboxtotal" AutoPostBack="True" OnCheckedChanged="cbSelectAll_CheckedChanged" Text="全选" />
                        </td>
                        <td style="text-align:right; border-top:solid 1px #f1f1f1; padding-right:10px; font-size:10pt; color:#999;">
                            <b style="color:#333;">合计</b>：<span style="font-weight:700; color:#E83633; font-size:12pt;"><small style="margin-right:2px;">￥</small><asp:Label ID="lblTotal" runat="server"></asp:Label></span>
                        </td>
                        <td style="width:110px; text-align:center; vertical-align:middle; height:50px; border-top:solid 1px #f1f1f1;">
                            <asp:Button ID="btnSubmit" runat="server" Text="结算" CssClass="add_cart" OnClick="lnbOrder_Click" style="width:100px; line-height:40px; background-image: linear-gradient(to right, #F20401 , #FD4715); border-radius:50px; border:0px; font-size:10pt; margin:0px;" />
                        </td>
                    </tr>
                </table>
            
            </div>
      
        </ContentTemplate>
    </asp:UpdatePanel>
       
</div>
             
<div style="height:85px;"></div>
    
<MojoCube:Footer id="Footer" runat="server" />
    
</form>

</body>
</html>
